package com.hmall.utils;

import com.hmall.user.vo.LoginVo;

/**
 * @author mengjie
 */
public class UserHolder {
    private static final ThreadLocal<LoginVo> tl = new ThreadLocal<>();

    public static void saveUser(LoginVo user) {
        tl.set(user);
    }

    public static LoginVo getUser() {
        return tl.get();
    }

    public static void removeUser() {
        tl.remove();
    }
}